else
this._grid = new IconGrid.IconGrid(gridParams);
+ this._grid.connect('key-focus-in', Lang.bind(this, function(grid, actor) {
+ this._keyFocusIn(actor);
+ }));
// Standard hack for ClutterBinLayout
this._grid.actor.x_expand = true;
this._allItems = [];
},
+ _keyFocusIn: function(actor) {
+ // Nothing by default
+ },
+
removeAll: function() {
this._grid.destroyAll();
this._items = {};
}));
},
- _ensureIconVisible: function(icon) {
+ _keyFocusIn: function(icon) {
let itemPage = this._grid.getItemPage(icon);
this.goToPage(itemPage);
},
this.actor.add_action(action);
},
+ _keyFocusIn: function(actor) {
+ Util.ensureActorVisibleInScrollView(this.actor, actor);
+ },
+
createFolderIcon: function(size) {
let layout = new Clutter.TableLayout();
let icon = new St.Widget({ layout_manager: layout,